﻿#ifndef SIMPLESHAPEBASEDMATCHING_H
#define SIMPLESHAPEBASEDMATCHING_H

#include "line2Dup.h"
#include "shape_based_matching/ShapeBasedMatching.h"

namespace Qly
{

/**
 * @brief The SimpleShapeBasedMatching class 最简单的形状匹配算法代码。不支持模板的旋转和缩放。
 */
class SimpleShapeBasedMatching : public ShapeBasedMatching
{
public:
    SimpleShapeBasedMatching();

    bool trainModel(cv::Mat modelImg, cv::Mat mask, int num_features);
    bool trainModel(cv::Mat modelImg, int num_features);
    bool saveModel(std::string path, std::string modelName) override;
    bool loadModel(std::string path, std::string modelName) override;
    std::vector<ShapeBasedMatching::MatchResult> runMatch(const cv::Mat &img, float score, size_t maxCount = 1) override;
};
}
#endif // SIMPLESHAPEBASEDMATCHING_H
